package edu.neu.cs6515.util;

/**
 * Util class for Number operations (which lib provides that one?)
 */
public final class Number {

    private static final double ACCURACY = 0.000001;

    /**
     * Private C'tor for Util class
     */
    private Number() {
    }

    /**
     * Compares the given double and int values within a set Accuracy
     * 
     * @param first
     *            double value to be compared
     * @param second
     *            int value to be compared
     * @return true if they are the same
     */
    public static boolean sameAs(final double first, final int second) {
        return Math.abs(first - second) < ACCURACY;
    }

}
